package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.Collections;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingCollectionsBinarySearchMethod {
	public static void main(String[] args) {
		ArrayList<Integer> integers = new ArrayList<>();
		integers.add(1);
		integers.add(2);
		integers.add(3);
		System.out.println("ArrayList 元素:" + integers);
		System.out.println("ArrayList 元素2的索引是:" + Collections.binarySearch(integers, 2));
	}
}
